package com.getpebble.android.common.provider.model;

import android.net.Uri;
import com.getpebble.android.common.core.util.PblContentProviderUtil;
import com.getpebble.android.common.model.PblDataModel;
import com.getpebble.android.common.model.PblDataModel.Column;
import com.getpebble.android.common.model.PblDataModel.Column.Type;

public class PblLockerAppDataModel extends PblDataModel {
    public static final Uri TABLE_URI = PblContentProviderUtil.getTableUri("locker_apps");

    public PblLockerAppDataModel() throws IllegalArgumentException {
        super("locker_apps");
        Column appIdColumn = new Column(Type.STRING, "app_id");
        appIdColumn.setUnique(true);
        addColumn(appIdColumn);
        addColumn(new Column(Type.STRING, "release_id"));
        addColumn(new Column(Type.STRING, "title"));
        addColumn(new Column(Type.STRING, "uuid"));
        addColumn(new Column(Type.STRING, "icon_image"));
        addColumn(new Column(Type.STRING, "list_image"));
        addColumn(new Column(Type.STRING, "type"));
        addColumn(new Column(Type.STRING, "pbw_file"));
        addColumn(new Column(Type.STRING, "href"));
        addColumn(new Column(Type.STRING, "author"));
        addColumn(new Column(Type.STRING, "description"));
        addColumn(new Column(Type.STRING, "locker_image"));
        addColumn(new Column(Type.STRING, "preview_image"));
        addColumn(new Column(Type.STRING, "screenshot_image"));
        addColumn(new Column(Type.STRING, "developer_id"));
        addColumn(new Column(Type.STRING, "version"));
        addColumn(new Column(Type.STRING, "companion_id"));
        addColumn(new Column(Type.STRING, "companion_name"));
        addColumn(new Column(Type.STRING, "companion_icon"));
        addColumn(new Column(Type.STRING, "companion_url"));
        addColumn(new Column(Type.STRING, "add_link"));
        addColumn(new Column(Type.STRING, "remove_link"));
    }

    public String getTableName() {
        return super.getTableName();
    }

    public int getNumColumns() {
        return getColumnSet().size();
    }
}
